cmake_minimum_required(VERSION 3.15)
project(sword)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")


file(GLOB SRC_LIST ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) 
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/exten/glfw/include)
# set(LIBRARY_OUTPUT_PATH /home/gallon/code_git/code/engine2/sword/bin)
# add_library(text STATIC ${SRC_LIST})


set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin)
add_executable(app ${SRC_LIST})

add_subdirectory(extern/glfw)

target_link_directories(app PRIVATE extern/glfw/src)
target_link_libraries(app glfw GL glut)
